<template>
  <div>
    
  </div>
</template>

<script lang="ts">
export default {
  name: 'SD66',
  props: {
  
  }
}
</script>

<script lang="ts" setup>
import { ref } from "vue";
import  axios from "axios";
interface Role {
    id: number;
    name:string;
    code :string;
    sort:number;
    status:number;//确保定义了status属性
}
const roles =ref<Role[]>([]);
const getRolePageHandler = async()=>{
    axios({ method: 'GET',url: 'http://localhost:8989/roles/page?pageNum=1&pagesize=188'}).then(
        (res)=>{
            console.log(res.data.data.list);
            roles.value =res.data.data.list;
        },
    );
};
const postRolesHandler=async()=>{
    const newRole = {
        name:'LIAO',
        code:'zxc4',
        sort:4,
        status:1,
        datascope:3,
    }
    axios({ method: 'posT', url:'http://localhost:8989/roles', data:JSON.stringify(newRole) }).then(
        (res) => {
            console.log(res.data);
            },

    );
};



</script>

<!-- 样式 -->
<style scoped>
  
</style>